Triangular Heaps
نویسندگان
چکیده
In this paper we introduce the triangular heap, a heap with the special property that for every father node its right child (if present) is smaller than its left child. We show how triangular heaps can be applied to the traditional problem of sorting an array in situ in ways quite similar to well-known methods using ordinary heaps. An average case analysis is presented for the construction and for the sorting process of both ordinary and triangular heaps.
منابع مشابه
Fractal Sequences and Restricted Nim
The Grundy number of an impartial game G is the size of the unique Nim heap equal to G. We introduce a new variant of Nim, Restricted Nim, which restricts the number of stones a player may remove from a heap in terms of the size of the heap. Certain classes of Restricted Nim are found to produce sequences of Grundy numbers with a self-similar fractal structure. Extending work of C. Kimberling, ...
متن کاملPairing Heaps are Sub - optimalbyMichael
Pairing heaps were introduced as a self-adjusting alternative to Fibonacci heaps. They provably enjoy log n amortized costs for the standard heap operations. Although it has not been veri ed that pairing heaps perform the decrease key operation in constant amortized time, this has been conjectured and extensive experimental evidence supports this conjecture. Moreover, pairing heaps have been ob...
متن کاملAverage site perimeter of directed animals on the two-dimensional lattices
We introduce new combinatorial (bijective) methods that enable us to compute the average value of three parameters of directed animals of a given area, including the site perimeter. Our results cover directed animals of any one-line source on the square lattice and its bounded variants, and we give counterparts for most of them in the triangular lattices. We thus prove conjectures by Conway and...
متن کاملImproved Upper Bounds for Pairing Heaps
Pairing heaps are shown to have constant amortized time Insert and Meld, thus showing that pairing heaps have the same amortized runtimes as Fibonacci heaps for all operations but Decrease-Key.
متن کاملBinomial Heaps and Skew Binomial Heaps
We implement and prove correct binomial heaps and skew binomial heaps. Both are data-structures for priority queues. While binomial heaps have logarithmic findMin, deleteMin, insert, and meld operations, skew binomial heaps have constant time findMin, insert, and meld operations, and only the deleteMin-operation is logarithmic. This is achieved by using skew links to avoid cascading linking on ...
متن کامل